#ifndef THREAD_H_
#define THREAD_H_

#include <windows.h>

namespace FURY
{
	namespace MODULE
	{
		class Thread
		{
		public:
			enum THREAD_CRAETE_STATE
			{
				THREAD_CREATE_RUNNING,
				THREAD_CREATE_SUSPEND,
			};
			enum THREAD_STATE
			{
				THREAD_CLOSED,
				THREAD_SUSPEND,
				THREAD_RUNNING,
			};

		protected:
			HANDLE		m_threadHandle;
			DWORD		m_threadID;
			THREAD_STATE	m_threadStatus;

		public:
			Thread(void);
			virtual ~Thread(void);

		protected:
			static DWORD WINAPI _RunProc(void* args);
			virtual int Run(void) = 0;

		public:
			virtual bool Create(THREAD_CRAETE_STATE state = THREAD_CREATE_SUSPEND);
			virtual int	Suspend(void);
			virtual int Resume(void);
			virtual int Destroy(void);

		public:
			bool	IsRunning(void);
			bool	IsSuspend(void);
			int		SetThreadPriority(int Priority);
		};
	};
};

#endif	// THREAD_H_